{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Importing PulP solver\n",
    "from pulp import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Inputing the Demand points\n",
    "demand_points=['Port of Mersin','Port of Jebel Ali']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['Port of Mersin', 'Port of Jebel Ali']"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "demand_points"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Inputing the Supply Points\n",
    "supply_points=['Port of Santos','Sihanoukville','Douala','Port of Shanghai','Puerto Quetzal','Port of Jawaharlal Nehru','Port of Tanjung Priok','Port of Abidjan','Port of Monrovia','Penang Port','Port of Manzanillo','Port of Yangon','Port of Lagos','Port of Manila','Port of  Colombo','Port of Bangkok','Port of Saigon']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['Port of Santos',\n",
       " 'Sihanoukville',\n",
       " 'Douala',\n",
       " 'Port of Shanghai',\n",
       " 'Puerto Quetzal',\n",
       " 'Port of Jawaharlal Nehru',\n",
       " 'Port of Tanjung Priok',\n",
       " 'Port of Abidjan',\n",
       " 'Port of Monrovia',\n",
       " 'Penang Port',\n",
       " 'Port of Manzanillo',\n",
       " 'Port of Yangon',\n",
       " 'Port of Lagos',\n",
       " 'Port of Manila',\n",
       " 'Port of  Colombo',\n",
       " 'Port of Bangkok',\n",
       " 'Port of Saigon']"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "supply_points"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Inputing the distances\n",
    "distance = dict(zip(supply_points,[dict(zip(demand_points, [7528,9407])),\n",
    "dict(zip(demand_points, [6531,4613])),\n",
    "dict(zip(demand_points, [9537,8017])),\n",
    "dict(zip(demand_points, [8546,6627])),\n",
    "dict(zip(demand_points, [8681,11949])),\n",
    "dict(zip(demand_points, [3720,1335])),\n",
    "dict(zip(demand_points, [6210,4405])),\n",
    "dict(zip(demand_points, [5072,8568])),\n",
    "dict(zip(demand_points, [4677,7951])),\n",
    "dict(zip(demand_points, [5520,3601])),\n",
    "dict(zip(demand_points, [9516,12790])),\n",
    "dict(zip(demand_points, [5644,3687])),\n",
    "dict(zip(demand_points, [5523,8316])),\n",
    "dict(zip(demand_points, [7458,5539])),\n",
    "dict(zip(demand_points, [4220,2276])),\n",
    "dict(zip(demand_points, [6766,4847])),\n",
    "dict(zip(demand_points, [6628,4709]))]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'Port of Santos': {'Port of Mersin': 7528, 'Port of Jebel Ali': 9407},\n",
       " 'Sihanoukville': {'Port of Mersin': 6531, 'Port of Jebel Ali': 4613},\n",
       " 'Douala': {'Port of Mersin': 9537, 'Port of Jebel Ali': 8017},\n",
       " 'Port of Shanghai': {'Port of Mersin': 8546, 'Port of Jebel Ali': 6627},\n",
       " 'Puerto Quetzal': {'Port of Mersin': 8681, 'Port of Jebel Ali': 11949},\n",
       " 'Port of Jawaharlal Nehru': {'Port of Mersin': 3720,\n",
       "  'Port of Jebel Ali': 1335},\n",
       " 'Port of Tanjung Priok': {'Port of Mersin': 6210, 'Port of Jebel Ali': 4405},\n",
       " 'Port of Abidjan': {'Port of Mersin': 5072, 'Port of Jebel Ali': 8568},\n",
       " 'Port of Monrovia': {'Port of Mersin': 4677, 'Port of Jebel Ali': 7951},\n",
       " 'Penang Port': {'Port of Mersin': 5520, 'Port of Jebel Ali': 3601},\n",
       " 'Port of Manzanillo': {'Port of Mersin': 9516, 'Port of Jebel Ali': 12790},\n",
       " 'Port of Yangon': {'Port of Mersin': 5644, 'Port of Jebel Ali': 3687},\n",
       " 'Port of Lagos': {'Port of Mersin': 5523, 'Port of Jebel Ali': 8316},\n",
       " 'Port of Manila': {'Port of Mersin': 7458, 'Port of Jebel Ali': 5539},\n",
       " 'Port of  Colombo': {'Port of Mersin': 4220, 'Port of Jebel Ali': 2276},\n",
       " 'Port of Bangkok': {'Port of Mersin': 6766, 'Port of Jebel Ali': 4847},\n",
       " 'Port of Saigon': {'Port of Mersin': 6628, 'Port of Jebel Ali': 4709}}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "distance"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Inputing the Rubber Demand\n",
    "rubber_demand=dict(zip(demand_points, [71757741.82,82512716.94]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'Port of Mersin': 71757741.82, 'Port of Jebel Ali': 82512716.94}"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rubber_demand"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Inputing the Rubber Supply\n",
    "rubber_supply=dict(zip(supply_points, [1258648.2900,8234049.7510,217343.9060,8784079.7960,3935392.5450,6522791.1570,34239646.0300,3411326.1430,603911.1280,5312726.1900,330881.7674,1946363.3380,1386711.0420,2541650.1950,741564.4317,49185954.9800,25617418.0800])) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'Port of Santos': 1258648.29,\n",
       " 'Sihanoukville': 8234049.751,\n",
       " 'Douala': 217343.906,\n",
       " 'Port of Shanghai': 8784079.796,\n",
       " 'Puerto Quetzal': 3935392.545,\n",
       " 'Port of Jawaharlal Nehru': 6522791.157,\n",
       " 'Port of Tanjung Priok': 34239646.03,\n",
       " 'Port of Abidjan': 3411326.143,\n",
       " 'Port of Monrovia': 603911.128,\n",
       " 'Penang Port': 5312726.19,\n",
       " 'Port of Manzanillo': 330881.7674,\n",
       " 'Port of Yangon': 1946363.338,\n",
       " 'Port of Lagos': 1386711.042,\n",
       " 'Port of Manila': 2541650.195,\n",
       " 'Port of  Colombo': 741564.4317,\n",
       " 'Port of Bangkok': 49185954.98,\n",
       " 'Port of Saigon': 25617418.08}"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rubber_supply"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Set Problem Variables\n",
    "prob = LpProblem(\"Transportation\", LpMinimize)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Transportation:\n",
       "MINIMIZE\n",
       "None\n",
       "VARIABLES"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "prob"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Set Problem Variables\n",
    "routes = [(i,j) for i in supply_points for j in demand_points]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[('Port of Santos', 'Port of Mersin'),\n",
       " ('Port of Santos', 'Port of Jebel Ali'),\n",
       " ('Sihanoukville', 'Port of Mersin'),\n",
       " ('Sihanoukville', 'Port of Jebel Ali'),\n",
       " ('Douala', 'Port of Mersin'),\n",
       " ('Douala', 'Port of Jebel Ali'),\n",
       " ('Port of Shanghai', 'Port of Mersin'),\n",
       " ('Port of Shanghai', 'Port of Jebel Ali'),\n",
       " ('Puerto Quetzal', 'Port of Mersin'),\n",
       " ('Puerto Quetzal', 'Port of Jebel Ali'),\n",
       " ('Port of Jawaharlal Nehru', 'Port of Mersin'),\n",
       " ('Port of Jawaharlal Nehru', 'Port of Jebel Ali'),\n",
       " ('Port of Tanjung Priok', 'Port of Mersin'),\n",
       " ('Port of Tanjung Priok', 'Port of Jebel Ali'),\n",
       " ('Port of Abidjan', 'Port of Mersin'),\n",
       " ('Port of Abidjan', 'Port of Jebel Ali'),\n",
       " ('Port of Monrovia', 'Port of Mersin'),\n",
       " ('Port of Monrovia', 'Port of Jebel Ali'),\n",
       " ('Penang Port', 'Port of Mersin'),\n",
       " ('Penang Port', 'Port of Jebel Ali'),\n",
       " ('Port of Manzanillo', 'Port of Mersin'),\n",
       " ('Port of Manzanillo', 'Port of Jebel Ali'),\n",
       " ('Port of Yangon', 'Port of Mersin'),\n",
       " ('Port of Yangon', 'Port of Jebel Ali'),\n",
       " ('Port of Lagos', 'Port of Mersin'),\n",
       " ('Port of Lagos', 'Port of Jebel Ali'),\n",
       " ('Port of Manila', 'Port of Mersin'),\n",
       " ('Port of Manila', 'Port of Jebel Ali'),\n",
       " ('Port of  Colombo', 'Port of Mersin'),\n",
       " ('Port of  Colombo', 'Port of Jebel Ali'),\n",
       " ('Port of Bangkok', 'Port of Mersin'),\n",
       " ('Port of Bangkok', 'Port of Jebel Ali'),\n",
       " ('Port of Saigon', 'Port of Mersin'),\n",
       " ('Port of Saigon', 'Port of Jebel Ali')]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "routes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Decision Variables\n",
    "X = LpVariable.dicts(\"ShipmentAmount\",(supply_points, demand_points),0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'Port of Santos': {'Port of Mersin': ShipmentAmount_Port_of_Santos_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali},\n",
       " 'Sihanoukville': {'Port of Mersin': ShipmentAmount_Sihanoukville_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Sihanoukville_Port_of_Jebel_Ali},\n",
       " 'Douala': {'Port of Mersin': ShipmentAmount_Douala_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Douala_Port_of_Jebel_Ali},\n",
       " 'Port of Shanghai': {'Port of Mersin': ShipmentAmount_Port_of_Shanghai_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali},\n",
       " 'Puerto Quetzal': {'Port of Mersin': ShipmentAmount_Puerto_Quetzal_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Puerto_Quetzal_Port_of_Jebel_Ali},\n",
       " 'Port of Jawaharlal Nehru': {'Port of Mersin': ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Jebel_Ali},\n",
       " 'Port of Tanjung Priok': {'Port of Mersin': ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Jebel_Ali},\n",
       " 'Port of Abidjan': {'Port of Mersin': ShipmentAmount_Port_of_Abidjan_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Abidjan_Port_of_Jebel_Ali},\n",
       " 'Port of Monrovia': {'Port of Mersin': ShipmentAmount_Port_of_Monrovia_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Monrovia_Port_of_Jebel_Ali},\n",
       " 'Penang Port': {'Port of Mersin': ShipmentAmount_Penang_Port_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Penang_Port_Port_of_Jebel_Ali},\n",
       " 'Port of Manzanillo': {'Port of Mersin': ShipmentAmount_Port_of_Manzanillo_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Manzanillo_Port_of_Jebel_Ali},\n",
       " 'Port of Yangon': {'Port of Mersin': ShipmentAmount_Port_of_Yangon_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Yangon_Port_of_Jebel_Ali},\n",
       " 'Port of Lagos': {'Port of Mersin': ShipmentAmount_Port_of_Lagos_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Lagos_Port_of_Jebel_Ali},\n",
       " 'Port of Manila': {'Port of Mersin': ShipmentAmount_Port_of_Manila_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Manila_Port_of_Jebel_Ali},\n",
       " 'Port of  Colombo': {'Port of Mersin': ShipmentAmount_Port_of__Colombo_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of__Colombo_Port_of_Jebel_Ali},\n",
       " 'Port of Bangkok': {'Port of Mersin': ShipmentAmount_Port_of_Bangkok_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Bangkok_Port_of_Jebel_Ali},\n",
       " 'Port of Saigon': {'Port of Mersin': ShipmentAmount_Port_of_Saigon_Port_of_Mersin,\n",
       "  'Port of Jebel Ali': ShipmentAmount_Port_of_Saigon_Port_of_Jebel_Ali}}"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Objective Function\n",
    "prob += sum(X[i][j]*distance[i][j] for (i,j) in routes)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Transportation:\n",
       "MINIMIZE\n",
       "8017*ShipmentAmount_Douala_Port_of_Jebel_Ali + 9537*ShipmentAmount_Douala_Port_of_Mersin + 3601*ShipmentAmount_Penang_Port_Port_of_Jebel_Ali + 5520*ShipmentAmount_Penang_Port_Port_of_Mersin + 8568*ShipmentAmount_Port_of_Abidjan_Port_of_Jebel_Ali + 5072*ShipmentAmount_Port_of_Abidjan_Port_of_Mersin + 4847*ShipmentAmount_Port_of_Bangkok_Port_of_Jebel_Ali + 6766*ShipmentAmount_Port_of_Bangkok_Port_of_Mersin + 1335*ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Jebel_Ali + 3720*ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Mersin + 8316*ShipmentAmount_Port_of_Lagos_Port_of_Jebel_Ali + 5523*ShipmentAmount_Port_of_Lagos_Port_of_Mersin + 5539*ShipmentAmount_Port_of_Manila_Port_of_Jebel_Ali + 7458*ShipmentAmount_Port_of_Manila_Port_of_Mersin + 12790*ShipmentAmount_Port_of_Manzanillo_Port_of_Jebel_Ali + 9516*ShipmentAmount_Port_of_Manzanillo_Port_of_Mersin + 7951*ShipmentAmount_Port_of_Monrovia_Port_of_Jebel_Ali + 4677*ShipmentAmount_Port_of_Monrovia_Port_of_Mersin + 4709*ShipmentAmount_Port_of_Saigon_Port_of_Jebel_Ali + 6628*ShipmentAmount_Port_of_Saigon_Port_of_Mersin + 9407*ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali + 7528*ShipmentAmount_Port_of_Santos_Port_of_Mersin + 6627*ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali + 8546*ShipmentAmount_Port_of_Shanghai_Port_of_Mersin + 4405*ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Jebel_Ali + 6210*ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Mersin + 3687*ShipmentAmount_Port_of_Yangon_Port_of_Jebel_Ali + 5644*ShipmentAmount_Port_of_Yangon_Port_of_Mersin + 2276*ShipmentAmount_Port_of__Colombo_Port_of_Jebel_Ali + 4220*ShipmentAmount_Port_of__Colombo_Port_of_Mersin + 11949*ShipmentAmount_Puerto_Quetzal_Port_of_Jebel_Ali + 8681*ShipmentAmount_Puerto_Quetzal_Port_of_Mersin + 4613*ShipmentAmount_Sihanoukville_Port_of_Jebel_Ali + 6531*ShipmentAmount_Sihanoukville_Port_of_Mersin + 0\n",
       "VARIABLES\n",
       "ShipmentAmount_Douala_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Douala_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Penang_Port_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Penang_Port_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Abidjan_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Abidjan_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Bangkok_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Bangkok_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Lagos_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Lagos_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Manila_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Manila_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Manzanillo_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Manzanillo_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Monrovia_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Monrovia_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Saigon_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Saigon_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Yangon_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Yangon_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of__Colombo_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of__Colombo_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Puerto_Quetzal_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Puerto_Quetzal_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Sihanoukville_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Sihanoukville_Port_of_Mersin Continuous"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "prob"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Transportation:\n",
       "MINIMIZE\n",
       "8017*ShipmentAmount_Douala_Port_of_Jebel_Ali + 9537*ShipmentAmount_Douala_Port_of_Mersin + 3601*ShipmentAmount_Penang_Port_Port_of_Jebel_Ali + 5520*ShipmentAmount_Penang_Port_Port_of_Mersin + 8568*ShipmentAmount_Port_of_Abidjan_Port_of_Jebel_Ali + 5072*ShipmentAmount_Port_of_Abidjan_Port_of_Mersin + 4847*ShipmentAmount_Port_of_Bangkok_Port_of_Jebel_Ali + 6766*ShipmentAmount_Port_of_Bangkok_Port_of_Mersin + 1335*ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Jebel_Ali + 3720*ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Mersin + 8316*ShipmentAmount_Port_of_Lagos_Port_of_Jebel_Ali + 5523*ShipmentAmount_Port_of_Lagos_Port_of_Mersin + 5539*ShipmentAmount_Port_of_Manila_Port_of_Jebel_Ali + 7458*ShipmentAmount_Port_of_Manila_Port_of_Mersin + 12790*ShipmentAmount_Port_of_Manzanillo_Port_of_Jebel_Ali + 9516*ShipmentAmount_Port_of_Manzanillo_Port_of_Mersin + 7951*ShipmentAmount_Port_of_Monrovia_Port_of_Jebel_Ali + 4677*ShipmentAmount_Port_of_Monrovia_Port_of_Mersin + 4709*ShipmentAmount_Port_of_Saigon_Port_of_Jebel_Ali + 6628*ShipmentAmount_Port_of_Saigon_Port_of_Mersin + 9407*ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali + 7528*ShipmentAmount_Port_of_Santos_Port_of_Mersin + 6627*ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali + 8546*ShipmentAmount_Port_of_Shanghai_Port_of_Mersin + 4405*ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Jebel_Ali + 6210*ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Mersin + 3687*ShipmentAmount_Port_of_Yangon_Port_of_Jebel_Ali + 5644*ShipmentAmount_Port_of_Yangon_Port_of_Mersin + 2276*ShipmentAmount_Port_of__Colombo_Port_of_Jebel_Ali + 4220*ShipmentAmount_Port_of__Colombo_Port_of_Mersin + 11949*ShipmentAmount_Puerto_Quetzal_Port_of_Jebel_Ali + 8681*ShipmentAmount_Puerto_Quetzal_Port_of_Mersin + 4613*ShipmentAmount_Sihanoukville_Port_of_Jebel_Ali + 6531*ShipmentAmount_Sihanoukville_Port_of_Mersin + 0\n",
       "SUBJECT TO\n",
       "_C1: ShipmentAmount_Douala_Port_of_Mersin\n",
       " + ShipmentAmount_Penang_Port_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Abidjan_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Bangkok_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Lagos_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Manila_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Manzanillo_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Monrovia_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Saigon_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Santos_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Shanghai_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Yangon_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of__Colombo_Port_of_Mersin\n",
       " + ShipmentAmount_Puerto_Quetzal_Port_of_Mersin\n",
       " + ShipmentAmount_Sihanoukville_Port_of_Mersin >= 71757741.82\n",
       "\n",
       "_C2: ShipmentAmount_Douala_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Penang_Port_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Abidjan_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Bangkok_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Lagos_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Manila_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Manzanillo_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Monrovia_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Saigon_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Yangon_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of__Colombo_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Puerto_Quetzal_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Sihanoukville_Port_of_Jebel_Ali >= 82512716.94\n",
       "\n",
       "VARIABLES\n",
       "ShipmentAmount_Douala_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Douala_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Penang_Port_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Penang_Port_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Abidjan_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Abidjan_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Bangkok_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Bangkok_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Lagos_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Lagos_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Manila_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Manila_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Manzanillo_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Manzanillo_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Monrovia_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Monrovia_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Saigon_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Saigon_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Yangon_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Yangon_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of__Colombo_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of__Colombo_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Puerto_Quetzal_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Puerto_Quetzal_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Sihanoukville_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Sihanoukville_Port_of_Mersin Continuous"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Constraints\n",
    "for j in demand_points:\n",
    "    prob += sum(X[i][j] for i in supply_points) >= rubber_demand[j]\n",
    "    \n",
    "prob"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Transportation:\n",
       "MINIMIZE\n",
       "8017*ShipmentAmount_Douala_Port_of_Jebel_Ali + 9537*ShipmentAmount_Douala_Port_of_Mersin + 3601*ShipmentAmount_Penang_Port_Port_of_Jebel_Ali + 5520*ShipmentAmount_Penang_Port_Port_of_Mersin + 8568*ShipmentAmount_Port_of_Abidjan_Port_of_Jebel_Ali + 5072*ShipmentAmount_Port_of_Abidjan_Port_of_Mersin + 4847*ShipmentAmount_Port_of_Bangkok_Port_of_Jebel_Ali + 6766*ShipmentAmount_Port_of_Bangkok_Port_of_Mersin + 1335*ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Jebel_Ali + 3720*ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Mersin + 8316*ShipmentAmount_Port_of_Lagos_Port_of_Jebel_Ali + 5523*ShipmentAmount_Port_of_Lagos_Port_of_Mersin + 5539*ShipmentAmount_Port_of_Manila_Port_of_Jebel_Ali + 7458*ShipmentAmount_Port_of_Manila_Port_of_Mersin + 12790*ShipmentAmount_Port_of_Manzanillo_Port_of_Jebel_Ali + 9516*ShipmentAmount_Port_of_Manzanillo_Port_of_Mersin + 7951*ShipmentAmount_Port_of_Monrovia_Port_of_Jebel_Ali + 4677*ShipmentAmount_Port_of_Monrovia_Port_of_Mersin + 4709*ShipmentAmount_Port_of_Saigon_Port_of_Jebel_Ali + 6628*ShipmentAmount_Port_of_Saigon_Port_of_Mersin + 9407*ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali + 7528*ShipmentAmount_Port_of_Santos_Port_of_Mersin + 6627*ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali + 8546*ShipmentAmount_Port_of_Shanghai_Port_of_Mersin + 4405*ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Jebel_Ali + 6210*ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Mersin + 3687*ShipmentAmount_Port_of_Yangon_Port_of_Jebel_Ali + 5644*ShipmentAmount_Port_of_Yangon_Port_of_Mersin + 2276*ShipmentAmount_Port_of__Colombo_Port_of_Jebel_Ali + 4220*ShipmentAmount_Port_of__Colombo_Port_of_Mersin + 11949*ShipmentAmount_Puerto_Quetzal_Port_of_Jebel_Ali + 8681*ShipmentAmount_Puerto_Quetzal_Port_of_Mersin + 4613*ShipmentAmount_Sihanoukville_Port_of_Jebel_Ali + 6531*ShipmentAmount_Sihanoukville_Port_of_Mersin + 0\n",
       "SUBJECT TO\n",
       "_C1: ShipmentAmount_Douala_Port_of_Mersin\n",
       " + ShipmentAmount_Penang_Port_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Abidjan_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Bangkok_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Lagos_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Manila_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Manzanillo_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Monrovia_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Saigon_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Santos_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Shanghai_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of_Yangon_Port_of_Mersin\n",
       " + ShipmentAmount_Port_of__Colombo_Port_of_Mersin\n",
       " + ShipmentAmount_Puerto_Quetzal_Port_of_Mersin\n",
       " + ShipmentAmount_Sihanoukville_Port_of_Mersin >= 71757741.82\n",
       "\n",
       "_C2: ShipmentAmount_Douala_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Penang_Port_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Abidjan_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Bangkok_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Lagos_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Manila_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Manzanillo_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Monrovia_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Saigon_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Yangon_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of__Colombo_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Puerto_Quetzal_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Sihanoukville_Port_of_Jebel_Ali >= 82512716.94\n",
       "\n",
       "_C3: ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Santos_Port_of_Mersin = 1258648.29\n",
       "\n",
       "_C4: ShipmentAmount_Sihanoukville_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Sihanoukville_Port_of_Mersin = 8234049.751\n",
       "\n",
       "_C5: ShipmentAmount_Douala_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Douala_Port_of_Mersin = 217343.906\n",
       "\n",
       "_C6: ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Shanghai_Port_of_Mersin = 8784079.796\n",
       "\n",
       "_C7: ShipmentAmount_Puerto_Quetzal_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Puerto_Quetzal_Port_of_Mersin = 3935392.545\n",
       "\n",
       "_C8: ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Mersin = 6522791.157\n",
       "\n",
       "_C9: ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Mersin = 34239646.03\n",
       "\n",
       "_C10: ShipmentAmount_Port_of_Abidjan_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Abidjan_Port_of_Mersin = 3411326.143\n",
       "\n",
       "_C11: ShipmentAmount_Port_of_Monrovia_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Monrovia_Port_of_Mersin = 603911.128\n",
       "\n",
       "_C12: ShipmentAmount_Penang_Port_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Penang_Port_Port_of_Mersin = 5312726.19\n",
       "\n",
       "_C13: ShipmentAmount_Port_of_Manzanillo_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Manzanillo_Port_of_Mersin = 330881.7674\n",
       "\n",
       "_C14: ShipmentAmount_Port_of_Yangon_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Yangon_Port_of_Mersin = 1946363.338\n",
       "\n",
       "_C15: ShipmentAmount_Port_of_Lagos_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Lagos_Port_of_Mersin = 1386711.042\n",
       "\n",
       "_C16: ShipmentAmount_Port_of_Manila_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Manila_Port_of_Mersin = 2541650.195\n",
       "\n",
       "_C17: ShipmentAmount_Port_of__Colombo_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of__Colombo_Port_of_Mersin = 741564.4317\n",
       "\n",
       "_C18: ShipmentAmount_Port_of_Bangkok_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Bangkok_Port_of_Mersin = 49185954.98\n",
       "\n",
       "_C19: ShipmentAmount_Port_of_Saigon_Port_of_Jebel_Ali\n",
       " + ShipmentAmount_Port_of_Saigon_Port_of_Mersin = 25617418.08\n",
       "\n",
       "VARIABLES\n",
       "ShipmentAmount_Douala_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Douala_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Penang_Port_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Penang_Port_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Abidjan_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Abidjan_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Bangkok_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Bangkok_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Lagos_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Lagos_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Manila_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Manila_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Manzanillo_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Manzanillo_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Monrovia_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Monrovia_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Saigon_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Saigon_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Santos_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Shanghai_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of_Yangon_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of_Yangon_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Port_of__Colombo_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Port_of__Colombo_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Puerto_Quetzal_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Puerto_Quetzal_Port_of_Mersin Continuous\n",
       "ShipmentAmount_Sihanoukville_Port_of_Jebel_Ali Continuous\n",
       "ShipmentAmount_Sihanoukville_Port_of_Mersin Continuous"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Constraints\n",
    "for i in supply_points:\n",
    "    prob += sum(X[i][j] for j in demand_points) == rubber_supply[i]\n",
    "prob"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Status: Optimal\n",
      "ShipmentAmount_Douala_Port_of_Mersin = 217343.91\n",
      "ShipmentAmount_Penang_Port_Port_of_Mersin = 5312726.2\n",
      "ShipmentAmount_Port_of_Abidjan_Port_of_Mersin = 3411326.1\n",
      "ShipmentAmount_Port_of_Bangkok_Port_of_Jebel_Ali = 36358850.0\n",
      "ShipmentAmount_Port_of_Bangkok_Port_of_Mersin = 12827105.0\n",
      "ShipmentAmount_Port_of_Jawaharlal_Nehru_Port_of_Jebel_Ali = 6522791.2\n",
      "ShipmentAmount_Port_of_Lagos_Port_of_Mersin = 1386711.0\n",
      "ShipmentAmount_Port_of_Manila_Port_of_Jebel_Ali = 2541650.2\n",
      "ShipmentAmount_Port_of_Manzanillo_Port_of_Mersin = 330881.77\n",
      "ShipmentAmount_Port_of_Monrovia_Port_of_Mersin = 603911.13\n",
      "ShipmentAmount_Port_of_Saigon_Port_of_Jebel_Ali = 25617418.0\n",
      "ShipmentAmount_Port_of_Santos_Port_of_Mersin = 1258648.3\n",
      "ShipmentAmount_Port_of_Shanghai_Port_of_Jebel_Ali = 8784079.8\n",
      "ShipmentAmount_Port_of_Tanjung_Priok_Port_of_Mersin = 34239646.0\n",
      "ShipmentAmount_Port_of_Yangon_Port_of_Jebel_Ali = 1946363.3\n",
      "ShipmentAmount_Port_of__Colombo_Port_of_Jebel_Ali = 741564.43\n",
      "ShipmentAmount_Puerto_Quetzal_Port_of_Mersin = 3935392.5\n",
      "ShipmentAmount_Sihanoukville_Port_of_Mersin = 8234049.8\n",
      "Total kilogram_miles = 845890524619.08\n"
     ]
    }
   ],
   "source": [
    "prob.solve()\n",
    "\n",
    "print(\"Status:\", LpStatus[prob.status])\n",
    "\n",
    "for v in prob.variables():\n",
    "    if v.varValue > 0:\n",
    "        print(v.name, \"=\", v.varValue)\n",
    "\n",
    "print(\"Total kilogram_miles =\", value(prob.objective))\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
